Basic Auth + PAM
2014/08/25 |
Limit accesses on specific web pages and use OS users for authentication with SSL connection.
|
|
[1] | |
[2] | For example, set Basic Auth under the [/var/www/html/auth-pam] directory. |
[root@www ~]#
vi /etc/httpd/conf.d/authnz_external.conf # add follows to the end <Directory /var/www/html/auth-pam> SSLRequireSSL AuthType Basic AuthName "PAM Authentication" AuthBasicProvider external AuthExternal pwauth require valid-user </Directory> # create a test page <html> <body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;"> Test Page for PAM Auth </div> </body> </html> /etc/rc.d/init.d/httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ] |
[3] | Access to the test page with a Web browser on Client and authenticate with a user which is on OS. |
[4] | Just accessed. |